<?

function printHeader( $aStyleSheets, $aTitle ){
	echo getHeader( $aStyleSheets, $aTitle );
}

function getHeader( $aStyleSheets, $aTitle ){
	$aStyleSheets[] = "css/template.css";
	$aStyleSheets[] = "css/general.css";
	$lReturn .= "
<head>
	<title> The Coyne Wedding </title>

	<!-- PNG fix for IE -->
	<!--[if lt IE 7.]>
	<script defer type=\"text/javascript\" src=\"js/pngfix.js\"></script>
	<![endif]-->
	";

	foreach( $aStyleSheets as $lStyleSheet ){
		$lReturn.="<link rel=\"stylesheet\" type=\"text/css\" href=\"".$lStyleSheet."\" >";
	}

	$lReturn.="
</head>
<body>
	<center>
	<div class='main coloredBorder'>
		<div class='header'></div>

		<div class='nav'>".
			createNavLink( "story.php", "Our Story" ).
			createNavLink( "location.php", "Location" ).
			createNavLink( "accomodations.php", "Accomodations" ).
			createNavLink( "registry.php", "Registry" ).
			createNavLink( "photos.php", "Photos" ).
		"</div>
		
		<div class='body'>

	";
	return $lReturn;
}


function printFooter( ){
	echo getFooter();
}

function getFooter( ){
	return 
		"</div>

		<div class='footer'>".
//			<table  class='monogramholder'><tr><td width='83%'></td><td><center>
//			<span class='monogram'><img src='images/monogram.png'/></span>
//			</center></td></tr></table>
			"<div class='monogram'><img src='images/monogram.png'/></div>
			 <div class='clear'></div>".
		"</div>
	</div>
	<div class='contactInfo'>
		If you have any questions or comments please send us an email at <a href='mailto:thecoynewedding@gmail.com'>TheCoyneWedding@gmail.com</a>
	</div>
	</center>
</body>
	";
}

$gNavLinkCt = 1;
function createNavLink( $aUrl, $aText ){
	global $gNavLinkCt;

	$lReturn = "<a href='".$aUrl."' class='link".$gNavLinkCt.
		( ( $_SERVER['PHP_SELF'] == "/".$aUrl)?" active".$gNavLinkCt:"" ).
		"'>".$aText."</a>\n";

	$gNavLinkCt++;
	return $lReturn;
}


if( $_GET['test'] ){
	printHeader( "", "Template" );
	printFooter();
}

?>
